package com.dog.modules.iot.mqtt.consumer.controller;


import com.dog.modules.iot.mqtt.consumer.annotation.CmdDispatcher;
import com.dog.modules.iot.mqtt.consumer.annotation.CmdMapping;
import com.dog.modules.iot.mqtt.consumer.enums.InCommandType;
import lombok.extern.slf4j.Slf4j;

/**
 */
@CmdDispatcher
@Slf4j
public class SystemCmdDispatcher extends BaseCmdDispatcher {



    @CmdMapping(cmd = InCommandType.DISCONNECT)
    public void disconnect(String deviceCode) {
        if (isAndroidClient(deviceCode)) {
            return;
        }
        log.info("处理设备 {} 离线消息",deviceCode);
        // todo 处理 业务逻辑
    }

    @CmdMapping(cmd = InCommandType.CONNECT)
    public void connnect(String deviceCode) {
       // todo  处理上线业务逻辑
        log.info("处理设备 {} 在线消息",deviceCode);
    }




}
